<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScript异步编程</title>
    <script src="./js07_async_callback.js" async></script>
    <link rel="stylesheet" href="../style/common.css">
</head>
<body>
    <h1>函数回调</h1>
    <p class="msg"></p>
    <script>
        // window.onload=function(){
        document.addEventListener("DOMContentLoaded",function(){
            let msg=document.querySelector(".msg");
            msg.innerHTML += doOperation();
            msg.innerHTML += "<br>";
            // msg.innerHTML += asyncDoOperation(msg);
            // doOperation();
            asyncDoOperation(msg);
        });
    // }
    </script>
    
</body>
</html>